{config_load file="global.conf"}
{config_load file="_TrackForecasts.conf" section="`$lang`"}

<table  border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" class="dasboard">
    <tr>
				<td width="95"><b>{#_TrackForecasts__labelSystemName#}</b></td>
        <td width="65"><b>{#_TrackForecasts__labelSignalID#}{*SignalID*}</b></td>
        <td width="65"><b>{#_TrackForecasts__labelPair#}{*Pair*}</b></td>
        <td width="45"><b>{#_TrackForecasts__labelAction#}{*Action*}</b></td>
				<td width="45"><b>{#_TrackForecasts__labelSize#}{*Lots*}</b></td>
        <td width="85"><b>{#_TrackForecasts__labelTime#}{*Time*}</b></td>
        <td width="55"><b>{#_TrackForecasts__labelEntry#}{*Entry*}</b></td>
        <td width="55"><b>{#_TrackForecasts__labelStop#}{*Stop*}</b></td>
        <td width="55"><b>{#_TrackForecasts__labelTarget#}{*Target*}</b></td>
        <td width="85"><b>{#_TrackForecasts__labelCloseTime#}{*Close*}</b></td>
        <td width="35"><b>{#_TrackForecasts__labelProfit#}{*Profit*}</b></td>
    </tr>

{assign var="TotalProfit" value="0"}
{assign var="link_finish" value="</a>"}
{assign var="link_tag_start" value="<a href='javascript:void(null);' "}
{*------------------------------------------------------------------------------------------------*}
{foreach key="ForecastIndex" name="forecasts" item="itemForecast" from=$ForecastArr}
{*------------------------------------------------------------------------------------------------*}
{* param block *}
{capture name="link_start"}
onclick="javascript:xajax_ShowDashboardForecast('{$itemForecast.TradeID}', '{$itemForecast.SystemID}', '{$itemForecast.ForecastID}'); return false;">
{/capture}

{assign var="link_start" value="`$smarty.capture.link_start`"}

{assign var="fstr" value="%0.`$itemForecast.decimal`f"}
{if $smarty.foreach.forecasts.iteration%2==1}
    {assign var="class_normal" value="class='darkRow'"}
{else}
    {assign var="class_normal" value=""}
{/if}
{assign var="class_selected" value="class='lightRow'"}
{* /param block *}


{*assign var="curr_system" value=$itemForecast.SystemName}
{php}
	//cut IntelliForex from the system name
	$curr_system = $this->get_template_vars('curr_system');
	$curr_system = split("IntelliForex ",$curr_system);
	$curr_system = $curr_system[1];
 	$this->assign("curr_system", $curr_system);
{/php *}

<tr {$link_start}

	<td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_SystemName_normal" {$class_normal}>
            {*$link_start*}{$itemForecast.SimpleSystemName}{*$curr_system*}{*$link_finish*}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_SystemName_selected" {$class_selected} style="display:none">
            {$itemForecast.SimpleSystemName}{*$curr_system*}
        </div>
    </td>

    <td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_SignalID_normal" {$class_normal}>
            {$link_tag_start}{$link_start}{$itemForecast.SignalID}{$link_finish}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_SignalID_selected" {$class_selected} style="display:none">
            {$itemForecast.SignalID}
        </div>
    </td>

    <td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_Pair_normal" {$class_normal}>
            {*$link_start*}{$itemForecast.Pair}{*$link_finish*}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_Pair_selected" {$class_selected} style="display:none">
            {$itemForecast.Pair}
        </div>
    </td>

    <td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_Side_normal" {$class_normal}>
            {*$link_start*}&nbsp;{if 0==$itemForecast.Side}{#_TrackForecasts__labelBuy#}{*BUY*}{else}{#_TrackForecasts__labelSell#}{*SELL*}{/if}{*$link_finish*}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_Side_selected" {$class_selected} style="display:none">
            &nbsp;{if 0==$itemForecast.Side}{#_TrackForecasts__labelBuy#}{*BUY*}{else}{#_TrackForecasts__labelSell#}{*SELL*}{/if}
        </div>
    </td>

		<td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_Size_normal" {$class_normal}>
            &nbsp;{$itemForecast.Size|string_format:"%d"}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_Size_selected" {$class_selected} style="display:none">
            &nbsp;{$itemForecast.Size|string_format:"%d"}
        </div>
    </td>

    <td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_OpenTimeF_normal" {$class_normal}>
            {*$link_start*}&nbsp;{$itemForecast.OpenTimeF}{*$link_finish*}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_OpenTimeF_selected" {$class_selected} style="display:none">
            &nbsp;{$itemForecast.OpenTimeF}
        </div>
    </td>

    <td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_BeginPrice_normal" {$class_normal}>
            {*$link_start*}&nbsp;{$itemForecast.BeginPrice|string_format:"`$fstr`"}{*$link_finish*}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_BeginPrice_selected" {$class_selected} style="display:none">
            &nbsp;{$itemForecast.BeginPrice|string_format:"`$fstr`"}
        </div>
    </td>

    <td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_StopPrice_normal" {$class_normal}>
            {*$link_start*}&nbsp;{$itemForecast.StopPrice|string_format:"`$fstr`"}{*$link_finish*}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_StopPrice_selected" {$class_selected} style="display:none">
            &nbsp;{$itemForecast.StopPrice|string_format:"`$fstr`"}
        </div>
    </td>

    <td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_EndPrice_normal" {$class_normal}>
            {*$link_start*}&nbsp;{$itemForecast.EndPrice|string_format:"`$fstr`"}{*$link_finish*}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_EndPrice_selected" {$class_selected} style="display:none">
            &nbsp;{$itemForecast.EndPrice|string_format:"`$fstr`"}
        </div>
    </td>

    <td>
        <div id="rowDashboard_{$itemForecast.ForecastID}_CloseTimeF_normal" {$class_normal}>
            {*$link_start*}&nbsp;{$itemForecast.CloseTimeF}{*$link_finish*}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_CloseTimeF_selected" {$class_selected} style="display:none">
            &nbsp;{$itemForecast.CloseTimeF}
        </div>
    </td>

    <td {$class_normal} align="right">
        <div id="rowDashboard_{$itemForecast.ForecastID}_Profit_normal" {$class_normal}>
            {*$link_start*}
                <font {if !$itemForecast.FlagActive} {if $itemForecast.Profit>=0} color="#708F32" {else} color="red" {/if}{else}color="{*blackorange*}"{/if}>
                    {$itemForecast.Profit}
                </font>
            {*$link_finish*}
        </div>

        <div id="rowDashboard_{$itemForecast.ForecastID}_Profit_selected" {$class_selected} style="display:none">

                <!--<font {if !$itemForecast.FlagActive} (*{if $itemForecast.Profit>=0} color="#708F32" {else} color="red" {/if}{else}color="{*blackorange*}"{/if}> -->
                    {$itemForecast.Profit}
                <!--</font>-->

        </div>
    </td>

</tr>


{assign var="TotalProfit" value="`$TotalProfit+$itemForecast.Profit`"}

{*------------------------------------------------------------------------------------------------*}
{/foreach}
{*------------------------------------------------------------------------------------------------*}
<tr>
    <td colspan="9"{*9*}>
        &nbsp;
    </td>

	<td align="left">
        <b>&nbsp;{#_TrackForecasts__labelTotal#}</b>
    </td>
    <td align="right">
        <b>{$TotalProfit}</b>
    </td>
</tr>

<tr>
    <td colspan="11"align="left">
        <a href="/{$lang}/track-record.html">{#_TrackForecasts__PerfTrackLabel#}</a> |
        <a href="/{$lang}/performance-calculator.html">{#_TrackForecasts__PerfCalcLabel#}</a>
    </td>
</tr>

<tr>
    <td colspan="11" {*10*}>
        <hr noshadow>
    </td>
</tr>
</table>



<div id="divDashboardForecast" style="display:block"> &nbsp; </div>
